import request from '@/utils/request'
//获取
export function getBanner(id) {
  return request({
    url: `/cms/BannerAdmin/getBanner/${id}`,
    method: 'get'
  })
}

export function pageBanner(page,limit) {
  return request({
    url: `/cms/BannerAdmin/pageBanner?page=${page}&limit=${limit}`,
    method: 'get'
  })
}


export function getBannerAll() {
  return request({
    url: `/cms/Banner/getBannerAll`,
    method: 'get'
  })
}

export function removeBanner(id) {
  return request({
    url: `/cms/BannerAdmin/removeBanner/${id}`,
    method: 'Delete'
  })
}

export function saveBanner(CrmBanner) {
  return request({
    url: `/cms/BannerAdmin/saveBanner`,
    method: 'post',
    data:CrmBanner
  })
}

  export function updateBanner(CrmBanner) {
    return request({
      url: `/cms/BannerAdmin/updateBanner`,
      method: 'put',
      data:CrmBanner
    })
}
